{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "2a8b7f27-b9c7-46cf-95a7-6b81e7104287",
   "metadata": {},
   "outputs": [],
   "source": [
    "def analyze_gradesself(self):\n",
    "    \"\"\"统计课程成绩\"\"\"\n",
    "    if not self.courses:\n",
    "        print(\"\\n当前没有课程数据!\")\n",
    "        input(\"\\n按回车键继续...\")\n",
    "        return\n",
    "    self.clear_screen()\n",
    "    print(\"\\n\"+\"=\"* 50)\n",
    "    print(\"统计课程成绩\".center(45))\n",
    "    print(\"=\"* 50)\n",
    "    print(\"可选课程:\")\n",
    "    for i, course in enumerate(sorted(self.courses),1):\n",
    "        print(f\"{i}. {course}\")\n",
    "        print(\"0.返回主菜单\")\n",
    "        print(\"=\"* 50)\n",
    "        choice = input(\"\\n请选择要统计的课程((输入课程名称或编号):\").strip()\n",
    "    if choice == '0':\n",
    "        return"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b044d7eb-599b-4664-855b-5a208113f3c7",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
